package chapter04

/**
 *
 * @author cdhuangchao3
 * @date 2023/6/4 5:28 PM
 */
object Test04_Practice_Pyramid {

  def main(args: Array[String]): Unit = {
    for {
      i <- 1 to 9
      stars = i * 2 - 1
      spaces = 9 - i
    } {
      println(" " * spaces + "*" * stars)
    }
  }
}
